package com.kaifamiao.demo.d0721;

public class Demo04 {

    public static void main(String[] args) {
        int[] arr = {2, 3, 4, 5, 6, 7};

        int index = 2;

        int[] newArr = new int[arr.length - 1];

        for (int i = 0, j = 0; i < arr.length; i ++){
            if (i == index){
                continue;
            }
            newArr[j ++] = arr[i];
        }

    }
}
